package top.liuziqian.shop.service.impl;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.liuziqian.common.core.text.Convert;
import top.liuziqian.shop.domain.GoodsSupplier;
import top.liuziqian.shop.mapper.GoodsSupplierMapper;
import top.liuziqian.shop.service.IGoodsSupplierService;

import java.util.List;

@Service
public class GoodsSupplierServiceImpl implements IGoodsSupplierService {

    @Autowired
    private GoodsSupplierMapper supplierMapper;

    @Override
    public GoodsSupplier selectSupplierById(Long supplierId) {
        return supplierMapper.selectSupplierById(supplierId);
    }

    @Override
    public List<GoodsSupplier> selectSupplierList(GoodsSupplier supplier) {
        return supplierMapper.selectSupplierList(supplier);
    }

    @Override
    public int insertSupplier(GoodsSupplier supplier) {
        return supplierMapper.insertSupplier(supplier);
    }

    @Override
    public int updateSupplier(GoodsSupplier supplier) {
        return supplierMapper.updateSupplier(supplier);
    }

    @Override
    public int deleteSupplierByIds(String ids) {
        return supplierMapper.deleteSupplierByIds(Convert.toStrArray(ids));
    }
}
